#include "ProcessBar.h"

char bar[NUM] = {0}; // 进度条主体
const char* cursor = "/-\\|"; // 光标样式

void ProcessBar()
{
    int count = 0;
    while (count <= 100)
    {
        printf("[%-100s] [%d%%] [%c]\r", bar, count, cursor[count%4]);
        bar[count++] = BODY;

        fflush(stdout);
        usleep(50000);
    }
    printf("\n");
}
